package com.dragon.modules.yuegou.model.park;

import com.dragon.modules.yuegou.entity.park.HistoryEntity;
import com.dragon.modules.yuegou.enums.park.HistoryPayType;
import com.dragon.modules.yuegou.enums.park.HistoryStatus;
import com.dragon.modules.yuegou.utils.PrivateStringUtils;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
/**
 * 历史停车信息表模型类
 * 
 * @author px
 * @date 2019-03-27 14:45:59
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class History extends HistoryEntity {

	/** 车牌号 */
	@ApiModelProperty("隐私车牌号")
	protected String hidePlateNumber;

	public String getHidePlateNumber() {
		if (PrivateStringUtils.isNotBlank(getPlateNumber())){
			hidePlateNumber = PrivateStringUtils.maskPlateNumber(getPlateNumber());
		}
		return hidePlateNumber;
	}

	public void setHidePlateNumber(String hidePlateNumber) {
		this.hidePlateNumber = hidePlateNumber;
	}

	/**
	 * 构造一个空历史停车信息表模型对象
	 */
	public History(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个历史停车信息表模型对象
	 * 
	 * @param entity 实体对象
	 */
	public History(HistoryEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个历史停车信息表模型对象
	 * 
	 * @param other 其它对象
	 */
	public History(History other){
		super(other);
	}


	@Override
	public String getThirdId() {
    	return thirdId;
    }

    /**
	 * 设置第三方ID
	 * 
	 * @param thirdId 第三方ID
	 * @return 当前对象
	 */
    public History thirdId(String thirdId) {
    	this.thirdId = thirdId;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈ID
	 * 
	 * @param busdId 商圈ID
	 * @return 当前对象
	 */
    public History busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置会员ID
	 * 
	 * @param memberId 会员ID
	 * @return 当前对象
	 */
    public History memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getMemberMobile() {
    	return memberMobile;
    }

    /**
	 * 设置会员手机号
	 * 
	 * @param memberMobile 会员手机号
	 * @return 当前对象
	 */
    public History memberMobile(String memberMobile) {
    	this.memberMobile = memberMobile;
    	return this;
    }

	@Override
	public String getPlateNumber() {
    	return plateNumber;
    }

    /**
	 * 设置
	 * 
	 * @param plateNumber 
	 * @return 当前对象
	 */
    public History plateNumber(String plateNumber) {
    	this.plateNumber = plateNumber;
    	return this;
    }

	@Override
	public String getParkingId() {
    	return parkingId;
    }

    /**
	 * 设置停车场ID
	 * 
	 * @param parkingId 停车场ID
	 * @return 当前对象
	 */
    public History parkingId(String parkingId) {
    	this.parkingId = parkingId;
    	return this;
    }

	@Override
	public String getParkingThirdNo() {
    	return parkingThirdNo;
    }

    /**
	 * 设置第三方系统停车场编号
	 * 
	 * @param parkingThirdNo 第三方系统停车场编号
	 * @return 当前对象
	 */
    public History parkingThirdNo(String parkingThirdNo) {
    	this.parkingThirdNo = parkingThirdNo;
    	return this;
    }

	@Override
	public String getParkingName() {
    	return parkingName;
    }

    /**
	 * 设置停车场名称
	 * 
	 * @param parkingName 停车场名称
	 * @return 当前对象
	 */
    public History parkingName(String parkingName) {
    	this.parkingName = parkingName;
    	return this;
    }

	@Override
	public String getUserType() {
    	return userType;
    }

    /**
	 * 设置用户类型 76:长租用户；77：临停用户
	 * 
	 * @param userType 用户类型 76:长租用户；77：临停用户
	 * @return 当前对象
	 */
    public History userType(String userType) {
    	this.userType = userType;
    	return this;
    }

	@Override
	public LocalDateTime getEntranceTime() {
    	return entranceTime;
    }

    /**
	 * 设置入场时间
	 * 
	 * @param entranceTime 入场时间
	 * @return 当前对象
	 */
    public History entranceTime(LocalDateTime entranceTime) {
    	this.entranceTime = entranceTime;
    	return this;
    }

	@Override
	public LocalDateTime getExitTime() {
    	return exitTime;
    }

    /**
	 * 设置出场时间
	 * 
	 * @param exitTime 出场时间
	 * @return 当前对象
	 */
    public History exitTime(LocalDateTime exitTime) {
    	this.exitTime = exitTime;
    	return this;
    }

	@Override
	public Long getStayedTime() {
    	return stayedTime;
    }

    /**
	 * 设置停留时间(以秒为单位计算)
	 * 
	 * @param stayedTime 停留时间(以秒为单位计算)
	 * @return 当前对象
	 */
    public History stayedTime(Long stayedTime) {
    	this.stayedTime = stayedTime;
    	return this;
    }

	@Override
	public BigDecimal getParkingFee() {
    	return parkingFee;
    }

    /**
	 * 设置总停车费
	 * 
	 * @param parkingFee 总停车费
	 * @return 当前对象
	 */
    public History parkingFee(BigDecimal parkingFee) {
    	this.parkingFee = parkingFee;
    	return this;
    }

	@Override
	public BigDecimal getPaidFee() {
    	return paidFee;
    }

    /**
	 * 设置已缴停车费
	 * 
	 * @param paidFee 已缴停车费
	 * @return 当前对象
	 */
    public History paidFee(BigDecimal paidFee) {
    	this.paidFee = paidFee;
    	return this;
    }

	@Override
	public BigDecimal getPaidOnlineFee() {
    	return paidOnlineFee;
    }

    /**
	 * 设置线上已缴费用
	 * 
	 * @param paidOnlineFee 线上已缴费用
	 * @return 当前对象
	 */
    public History paidOnlineFee(BigDecimal paidOnlineFee) {
    	this.paidOnlineFee = paidOnlineFee;
    	return this;
    }

	@Override
	public Integer getPaidTotal() {
    	return paidTotal;
    }

    /**
	 * 设置线上缴费次数
	 * 
	 * @param paidTotal 线上缴费次数
	 * @return 当前对象
	 */
    public History paidTotal(Integer paidTotal) {
    	this.paidTotal = paidTotal;
    	return this;
    }

	@Override
	public BigDecimal getPaidOfflineFee() {
    	return paidOfflineFee;
    }

    /**
	 * 设置线下缴费费用
	 * 
	 * @param paidOfflineFee 线下缴费费用
	 * @return 当前对象
	 */
    public History paidOfflineFee(BigDecimal paidOfflineFee) {
    	this.paidOfflineFee = paidOfflineFee;
    	return this;
    }

	@Override
	public String getFixParkingId() {
    	return fixParkingId;
    }

    /**
	 * 设置长租车位ID
	 * 
	 * @param fixParkingId 长租车位ID
	 * @return 当前对象
	 */
    public History fixParkingId(String fixParkingId) {
    	this.fixParkingId = fixParkingId;
    	return this;
    }

	@Override
	public String getRemainingDays() {
    	return remainingDays;
    }

    /**
	 * 设置长租剩余天数 如果是临停用户此字段为空
	 * 
	 * @param remainingDays 长租剩余天数 如果是临停用户此字段为空
	 * @return 当前对象
	 */
    public History remainingDays(String remainingDays) {
    	this.remainingDays = remainingDays;
    	return this;
    }

	@Override
	public String getCouponId() {
    	return couponId;
    }

    /**
	 * 设置停车券ID
	 * 
	 * @param couponId 停车券ID
	 * @return 当前对象
	 */
    public History couponId(String couponId) {
    	this.couponId = couponId;
    	return this;
    }

	@Override
	public String getCouponName() {
    	return couponName;
    }

    /**
	 * 设置停车券名字
	 * 
	 * @param couponName 停车券名字
	 * @return 当前对象
	 */
    public History couponName(String couponName) {
    	this.couponName = couponName;
    	return this;
    }

	@Override
	public BigDecimal getCouponDiscountFee() {
    	return couponDiscountFee;
    }

    /**
	 * 设置停车券抵扣金额
	 * 
	 * @param couponDiscountFee 停车券抵扣金额
	 * @return 当前对象
	 */
    public History couponDiscountFee(BigDecimal couponDiscountFee) {
    	this.couponDiscountFee = couponDiscountFee;
    	return this;
    }

	@Override
	public HistoryStatus getStatus() {
    	return status;
    }

    /**
	 * 设置[枚举]车牌状态：0-未入场-OUTSIDE、1-已入场-INSIDE
	 * 
	 * @param status [枚举]车牌状态：0-未入场-OUTSIDE、1-已入场-INSIDE
	 * @return 当前对象
	 */
    public History status(HistoryStatus status) {
    	this.status = status;
    	return this;
    }

	@Override
	public BigDecimal getIntegralFee() {
		return integralFee;
	}

	public History integralFee(BigDecimal integralFee) {
		this.integralFee = integralFee;
		return this;
	}

    @Override
    public Integer getIntegral() {
        return integral;
    }

    public History integral(Integer integral) {
        this.integral = integral;
        return this;
    }

	@Override
	public HistoryPayType getPayType() {
		return payType;
	}

	public History payType(HistoryPayType payType) {
		this.payType = payType;
		return this;
	}

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public History createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public LocalDateTime getModifiedTime() {
    	return modifiedTime;
    }

    /**
	 * 设置更新时间
	 * 
	 * @param modifiedTime 更新时间
	 * @return 当前对象
	 */
    public History modifiedTime(LocalDateTime modifiedTime) {
    	this.modifiedTime = modifiedTime;
    	return this;
    }
}
